package cc.mcggdd.leah.boot.stock.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import java.time.LocalDate;
import java.math.BigDecimal;
import jakarta.validation.constraints.*;

/**
 * 交易明细表单对象
 *
 * @author 
 * @since 2025-02-13 10:16
 */
@Getter
@Setter
@Schema(description = "交易明细表单对象")
public class StockTradingForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
    private Long id;

    @Schema(description = "股票代码")
    private String code;

    @Schema(description = "股票名称")
    private String name;

    @Schema(description = "持仓ID")
    @NotNull(message = "持仓ID不能为空")
    private Long holdingId;

    @Schema(description = "交易日期")
    private LocalDate date;

    @Schema(description = "单价")
    @NotNull(message = "单价不能为空")
    private BigDecimal price;

    @Schema(description = "数量")
    @NotNull(message = "数量不能为空")
    private Integer number;

    @Schema(description = "总金额")
    @NotNull(message = "总金额不能为空")
    private BigDecimal amount;

    @Schema(description = "佣金")
    @NotNull(message = "佣金不能为空")
    private BigDecimal commission;

    @Schema(description = "印花税")
    @NotNull(message = "印花税不能为空")
    private BigDecimal stampTax;

    @Schema(description = "总手续费")
    @NotNull(message = "总手续费不能为空")
    private BigDecimal fee;

    @Schema(description = "状态")
    @NotBlank(message = "状态不能为空")
    @Size(max=5, message="状态长度不能超过5个字符")
    private String status;


}
